var Reg_Class = (function() {
    // Private static attributes.
    var constants = {//定义了两个常量
        USERNAME: /^[a-zA-Z][a-zA-Z0-9]{3,19}$/,
        EMAIL:/^[a-z0-9][a-z\.0-9-_]+@[a-z0-9_-]+(?:\.[a-z]{0,3}\.[a-z]{0,2}|\.[a-z]{0,3}|\.[a-z]{0,2})$/i,
        MOBILE:/^(?:13|15|18|17|14)[0-9]{9}$/,
        PASSWORD:/^[a-zA-Z0-9]{6,20}$/,
        VERIFY:/^[a-zA-Z0-9]{4}$/,
        BIRTHDAY:/^\d{4}(\-)\d{1,2}\1\d{1,2}$/,
    }
    var Test={};
    // 定义了一个静态方法
    Test.getConstant=function(name){//获取常量的方法
        return constants[name];
    }
    return Test
})();